package weiy.top.modules.sku.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import weiy.top.modules.common.vo.Skus;
import weiy.top.modules.sku.entity.PmsSkuInfo;
import weiy.top.modules.sku.mapper.PmsSkuInfoMapper;
import weiy.top.modules.sku.service.IPmsSkuInfoService;
import org.springframework.stereotype.Service;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

import java.util.List;

/**
 * @Description: pms_sku_info
 * @Author: weihancheng
 * @Date:   2021-11-24
 * @Version: V1.0
 */
@Service
public class PmsSkuInfoServiceImpl extends ServiceImpl<PmsSkuInfoMapper, PmsSkuInfo> implements IPmsSkuInfoService {

    @Override
    public List<PmsSkuInfo> getSkusBySpuId(String spuId) {
        LambdaQueryWrapper<PmsSkuInfo> queryWrapper = new LambdaQueryWrapper<>();
        queryWrapper.eq(PmsSkuInfo::getSpuId, spuId);
        return list(queryWrapper);
    }
}
